module Language.Coal.Error(throwError, CoalError) where

import Control.Monad.Error

type CoalError = Either String

maybeToError :: Maybe a -> String -> CoalError a
maybeToError Nothing s = Left s
maybeToError (Just a) s = Right a